home *** CD-ROM | disk | FTP | other *** search
/ The Disc - MacWorld 1995 / PowerComputing (The Disc)(MacWorld 1995).ISO / mac / CDFACTOR / HCfactor / HumanCode / HumanCode.DXR / 00079.ls < prev    next >
Encoding:
Text File  |  1995-07-14  |  1.5 KB  |  45 lines

  1. global gAlphabetExist, objalphabetbtn, gSelLine
  2.  
  3. on mouseDown
  4.   set theLeft to the left of sprite 33
  5.   set theTop to the top of sprite 33
  6.   repeat while the stillDown
  7.     if rollOver(33) then
  8.       set thecolumn to (getAt(clickLoc(), 1) - theLeft) / 17
  9.       set theline to (getAt(clickLoc(), 2) - theTop) / 18
  10.       set theAlphabet to (theline * 27) + thecolumn + 1
  11.       set firstAlphabetLine to getAt(gAlphabetExist, theAlphabet)
  12.       if firstAlphabetLine = 0 then
  13.         set the visible of sprite 33 to 0
  14.         set the visible of sprite 33 to 1
  15.         updateStage()
  16.       else
  17.         set al to thecolumn * 17
  18.         set at to theline * 18
  19.         set theSrcRect to al & "," & at & "," & al + 17 & "," & at + 17
  20.         set theDestRect to theLeft + al & "," & theTop + at & "," & theLeft + al + 17 & "," & theTop + at + 17
  21.         blitPictDrawScreen(objalphabetbtn, theSrcRect, theDestRect, "copy", 0, 0)
  22.       end if
  23.       next repeat
  24.     end if
  25.     set the visible of sprite 33 to 0
  26.     set the visible of sprite 33 to 1
  27.     updateStage()
  28.   end repeat
  29.   set the visible of sprite 33 to 0
  30.   set the visible of sprite 33 to 1
  31.   updateStage()
  32.   if voidp(theAlphabet) then
  33.     exit
  34.   end if
  35.   if rollOver(33) then
  36.     set firstAlphabetLine to getAt(gAlphabetExist, theAlphabet)
  37.     if firstAlphabetLine <> 0 then
  38.       set gSelLine to firstAlphabetLine
  39.       set the foreColor of cast 34 to getAt(gColor, 4)
  40.       showKeyword(gSelLine, 1)
  41.       drawkeywords(gSelLine)
  42.     end if
  43.   end if
  44. end
  45.